<!--# layout("/common/layout.html",{"jsBase":"/js/promote/promoteWithdraw/"}){ -->

<form class="layui-form layui-form-pane" id="addForm"  lay-filter="editform">
    <input type="hidden" name="withdrawId" id="withdrawId">

    <div class="layui-row">
        <div class="layui-form-item">
            <div class="layui-inline">
            <label class="layui-form-label">提现会员</label>
				<div class="layui-input-inline">
                                <input type="text" name="customerId" id="customerId" autocomplete="off" maxlength="50" class="layui-input" >
				</div>
            </div>
            <div class="layui-inline">
            <label class="layui-form-label">app_id</label>
				<div class="layui-input-inline">
                                <input type="text" name="appId" id="appId" autocomplete="off" maxlength="50" class="layui-input" >
				</div>
            </div>
        </div>
    </div>

    <div class="layui-row">
        <div class="layui-form-item">
            <div class="layui-inline">
            <label class="layui-form-label">open_id</label>
				<div class="layui-input-inline">
                                <input type="text" name="openId" id="openId" autocomplete="off" maxlength="50" class="layui-input" >
				</div>
            </div>
            <div class="layui-inline">
            <label class="layui-form-label">微信昵称</label>
				<div class="layui-input-inline">
                                <input type="text" name="nickname" id="nickname" autocomplete="off" maxlength="50" class="layui-input" >
				</div>
            </div>
            <div class="layui-inline">
            <label class="layui-form-label">所属租户</label>
				<div class="layui-input-inline">
                                <input type="text" name="tenantId" id="tenantId" autocomplete="off" maxlength="50" class="layui-input" >
				</div>
            </div>
        </div>
    </div>

    <div class="layui-row">
        <div class="layui-form-item">
            <div class="layui-inline">
            <label class="layui-form-label">渠道</label>
				<div class="layui-input-inline">
                                <input type="text" name="channelCode" id="channelCode" autocomplete="off" maxlength="50" class="layui-input" >
				</div>
            </div>
            <div class="layui-inline">
            <label class="layui-form-label">推广码</label>
				<div class="layui-input-inline">
                                <input type="text" name="promoteCode" id="promoteCode" autocomplete="off" maxlength="50" class="layui-input" >
				</div>
            </div>
            <div class="layui-inline">
            <label class="layui-form-label">结算金额</label>
				<div class="layui-input-inline">
                                <input type="text" name="settlementAmount" id="settlementAmount" autocomplete="off" maxlength="50" class="layui-input" >
				</div>
            </div>
        </div>
    </div>

    <div class="layui-row">
        <div class="layui-form-item">
            <div class="layui-inline">
            <label class="layui-form-label">提现金额</label>
				<div class="layui-input-inline">
                                <input type="text" name="withdrawAmount" id="withdrawAmount" autocomplete="off" maxlength="50" class="layui-input" >
				</div>
            </div>
            <div class="layui-inline">
            <label class="layui-form-label">未结算金额</label>
				<div class="layui-input-inline">
                                <input type="text" name="unsettledAmount" id="unsettledAmount" autocomplete="off" maxlength="50" class="layui-input" >
				</div>
            </div>
            <div class="layui-inline">
            <label class="layui-form-label">申请时间</label>
				<div class="layui-input-inline">
                                <input type="text" name="applyTime" id="applyTime" autocomplete="off" maxlength="50" class="layui-input" >
				</div>
            </div>
        </div>
    </div>

    <div class="layui-row">
        <div class="layui-form-item">
            <div class="layui-inline">
            <label class="layui-form-label">提现状态</label>
				<div class="layui-input-inline">
                                <input type="radio" name="withdrawStatus" value="1" title="是">
                                <input type="radio" name="withdrawStatus" value="0" title="否">
				</div>
            </div>
            <div class="layui-inline">
            <label class="layui-form-label">转账时间</label>
				<div class="layui-input-inline">
                                <input type="text" name="withdrawTime" id="withdrawTime" autocomplete="off" maxlength="50" class="layui-input" >
				</div>
            </div>
            <div class="layui-inline">
            <label class="layui-form-label">异常信息</label>
				<div class="layui-input-inline">
                                <input type="text" name="errorMsg" id="errorMsg" autocomplete="off" maxlength="50" class="layui-input" >
				</div>
            </div>
        </div>
    </div>
    <layui:submitButtons id="addButton" />
</form>
<!--#} -->
<script>
layui.extend({
    loading: '../../../plugins/layui_extends/loading/loading',
}).define([ 'form', 'laydate', 'table','loading','promoteWithdrawApi'], function(exports) {
    var form = layui.form;
    var promoteWithdrawApi = layui.promoteWithdrawApi;
    var index = layui.index;
    var isNew = true;
    <!--# if(!(isEmpty(promoteWithdrawJson))){  -->
    isNew = false;
    <!--# } -->
    var view = {
        init:function(){
            Lib.initGenrealForm($("#addForm"),form);
            this.initSubmit();
        },
        initSubmit:function(){
            $("#addButton").click(function(){
                // $("#addButton").hide();
                // $("#addButton-loading").show();
                // $("#addButton-loading").loading();
                form.on('submit(form)', function(){
                    promoteWithdrawApi.saveForm(isNew,$('#addForm'),function(){
                        parent.window.dataReload();
                        Common.info("保存成功");
                        Lib.closeFrame();
                    });
                });
            });

            $("#addButton-cancel").click(function(){
                Lib.closeFrame();
            });
        }

    }
    view.init();
    <!--# if(!(isEmpty(promoteWithdrawJson))){  -->
    var formJson = ${promoteWithdrawJson};
    form.val("editform",formJson);
    <!--# } -->
});
</script>
